-
Notifications
You must be signed in to change notification settings - Fork 2
fix: address security vulnerabilities in webhooks plugin #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: cff50ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ℹ️ Download the latest wp-graphql-webhooks plugin zip from this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR strengthens security in the wp-graphql-webhooks
plugin by sanitizing inputs/outputs, tightening authorization checks, and ensuring sensitive data isn’t logged by default.
- Added
esc_html
and proper sanitization functions to exception messages, nonces, and user inputs - Wrapped debug logs in
WP_DEBUG
checks and removed sensitive URL/headers from default logs - Replaced capability checks and nonce verifications for admin actions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
plugins/wp-graphql-webhooks/src/Services/PluginServiceLocator.php | Escape exception messages with esc_html to prevent HTML injection |
plugins/wp-graphql-webhooks/src/Rest/WebhookTestEndpoint.php | Conditional debug logging, redact sensitive URL/headers, and static triggered_by |
plugins/wp-graphql-webhooks/src/Handlers/WebhookHandler.php | Wrapped dispatch logs in WP_DEBUG checks, but still logs sensitive URL/headers |
plugins/wp-graphql-webhooks/src/Events/SmartCacheWebhookManager.php | Added debug log guard and switched from parse_url to wp_parse_url |
plugins/wp-graphql-webhooks/src/Admin/WebhooksListTable.php | Sanitized orderby /order , escaped nonces, and outputs for bulk actions |
plugins/wp-graphql-webhooks/src/Admin/WebhooksAdmin.php | Improved nonce unslashing, but replaced capability check with only nonce verification |
.changeset/spotty-mice-behave.md | Added changelog entries for security hardening |
This pull request introduces security enhancements and debugging improvements to the
wp-graphql-webhooks
plugin. Key changes include improved input/output sanitization, stricter authorization checks, conditional logging for debugging, and adjustments to ensure sensitive information is not exposed in logs.